<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人注册</title>
    <!--引入favicon图标文件*/ -->
    <link rel="shortcut icon" href=" favicon.ico" />
    <!--引入初始化样式文件*/ -->
    <link rel="stylesheet" href="css/base.css">
    <!--引入注册页面的css文件*/ -->
    <link rel="stylesheet" href="css/register.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/reg.js"></script>
</head>
<body>
    <div class="w">
        <header>
            <div class="logo">
                <a href="index.html"><img src="images/logo.png" alt=""></a>
            </div>
        </header>
        <div class="registerarea">
            <h3>注册新用户
                <div class="login">我有账号，去<a href="#">登陆</a></div>
            </h3>
            <div class="reg_from">
                <form action="">
                    <ul>
                        <li>
                            <label for="tel">手机号：</label><input type="text" class="inp" id="tel">
                            <span class=""></span>
                        </li>
                        <li>
                            <label for="">短信验证码：</label><input type="text" class="inp" id="msg">
                            <span ></span>
                            <button class="yz">发送</button>
                        </li>
                        <li>
                            <label for="">登录密码：</label><input type="password" class="inp" id="pwd">
                            <span ></span>
                        </li>
                        <li class="safe">安全程度<em class="ruo">弱</em> <em class="zhong">中</em> <em class="qiang">强</em>
                        </li>
                        <li>
                            <label for="">确认密码：</label><input type="password" class="inp" id="surepwd">
                            <span ></span>
                        </li>
                        <li class="agree"><input type="checkbox" name="" id="">同意协议并注册<a href="#">《知晓用户协议》</a></li>
                        <li><input type="submit" value="提交注册" class="btn"></li>
                    </ul>
                </form>
            </div>
        </div>
        <footer>
            <div class="mod_copyright">
                <div class="links">
                    <a href="#">关于我们</a> | <a href="#">联系我们</a> | <a href="#">联系客服</a> | <a href="#">商家入驻</a> | <a href="#">营销中心</a> | <a href="#">手机品优购</a> | <a href="#">友情链接</a> | <a href="#">销售联盟</a> | ><a href="#">品优购社区</a> | <a href="#">品优购公益</a> | <a href="#">English Site</a> | <a href="#">Contact U</a>
                </div>
                <div class="copyright">
                    地址：北京市昌平区建材城西路金燕龙办公楼一层 邮编：100096 电话：400-618-4000 传真：010-82935100 邮箱: zhanghj+itcast.cn<br>
                    京ICP备08001421号京公网安备110108007702
                </div>
            </div>
        </footer>
    </div>
    <script>
        var btn = document.querySelector('.yz');
        var time = 3;
        btn.addEventListener('click', function() {
            btn.disabled = true;
            var timer = setInterval(function() {
                if(time == 0) {
                    clearInterval(timer);//清除定时器
                    btn.disabled = false;
                    btn.innerHTML = '发送';
                    time = 3;//时间复原

                } else {
                    btn.innerHTML = '还剩'+ time +'秒';
                    time--;
                }
                
            }, 1000);
        })
    </script>
</body>
</html>